} else {
$errors = $status->getErrorsByType( 'error' );
$logger = LoggerFactory::getInstance( 'http' );
- $logger->warning( $status->getWikiText( null, null, 'en' ),
+ $logger->warning( $status->getWikiText( false, false, 'en' ),
[ 'error' => $errors, 'caller' => $caller, 'content' => $req->getContent() ] );
return false;
}
$loginType = 'BotPassword';
} else {
LoggerFactory::getInstance( 'authmanager' )->info(
- 'BotPassword login failed: ' . $status->getWikiText()
+ 'BotPassword login failed: ' . $status->getWikiText( false, false, 'en' )
);
}
}
if ( is_null( $matches ) ) {
$this->dieUsage( "{$what} search is disabled", "search-{$what}-disabled" );
} elseif ( $matches instanceof Status && !$matches->isGood() ) {
- $this->dieUsage( $matches->getWikiText(), 'search-error' );
+ $this->dieUsage( $matches->getWikiText( false, false, 'en' ), 'search-error' );
}
if ( $resultPageSet === null ) {
'offset' => $this->mUpload->getOffset(),
];
- $this->dieUsage( $status->getWikiText(), 'stashfailed', 0, $extradata );
+ $this->dieUsage( $status->getWikiText( false, false, 'en' ), 'stashfailed', 0, $extradata );
}
}
$filekey,
[ 'result' => 'Failure', 'stage' => 'assembling', 'status' => $status ]
);
- $this->dieUsage( $status->getWikiText(), 'stashfailed' );
+ $this->dieUsage( $status->getWikiText( false, false, 'en' ), 'stashfailed' );
}
// The fully concatenated file has a new filekey. So remove
if ( !$progress ) {
$this->dieUsage( 'No result in status data', 'missingresult' );
} elseif ( !$progress['status']->isGood() ) {
- $this->dieUsage( $progress['status']->getWikiText(), 'stashfailed' );
+ $this->dieUsage( $progress['status']->getWikiText( false, false, 'en' ), 'stashfailed' );
}
if ( isset( $progress['status']->value['verification'] ) ) {
$this->checkVerification( $progress['status']->value['verification'] );
return $req->getContent();
} else {
$logger = LoggerFactory::getInstance( 'http' );
- $logger->warning( $status->getWikiText(), [ 'caller' => 'ForeignAPIRepo::httpGet' ] );
+ $logger->warning(
+ $status->getWikiText( false, false, 'en' ),
+ [ 'caller' => 'ForeignAPIRepo::httpGet' ]
+ );
return false;
}
}
$this->cleanupTarget( $triplets );
$destFile->unlock();
$this->file->unlockAndRollback(); // unlocks the destination
- wfDebugLog( 'imagemove', "Error in moving files: " . $statusMove->getWikiText() );
+ wfDebugLog( 'imagemove', "Error in moving files: "
+ . $statusMove->getWikiText( false, false, 'en' ) );
$statusMove->ok = false;
return $statusMove;
$this->params['filekey'],
[ 'result' => 'Failure', 'stage' => 'assembling', 'status' => $status ]
);
- $this->setLastError( $status->getWikiText() );
+ $this->setLastError( $status->getWikiText( false, false, 'en' ) );
return false;
}
$this->params['filekey'],
[ 'result' => 'Failure', 'stage' => 'publish', 'status' => $status ]
);
- $this->setLastError( $status->getWikiText() );
+ $this->setLastError( $status->getWikiText( false, false, 'en' ) );
return false;
}
'username' => $userName,
] );
} else {
- $logger->error( __METHOD__ . ': failed with message ' . $status->getWikiText(),
+ $logger->error(
+ __METHOD__ . ': failed with message ' . $status->getWikiText( false, false, 'en' ),
[
'username' => $userName,
- ] );
+ ]
+ );
}
$user->setId( $id );
$user->loadFromId( User::READ_LATEST );
] );
$status = $req->execute();
if ( !$status->isOK() ) {
- throw new Exception( "Error contacting depurate service: " . $status->getWikiText() );
+ throw new Exception( "Error contacting depurate service: "
+ . $status->getWikiText( false, false, 'en' ) );
} elseif ( $req->getStatus() !== 200 ) {
- throw new Exception( "Depurate returned error: " . $status->getWikiText() );
+ throw new Exception( "Depurate returned error: " . $status->getWikiText( false, false, 'en' ) );
}
$result = $req->getContent();
$startBody = strpos( $result, "<body>" );
} else {
$mp = new MovePage( $current, $target );
$status = $mp->move( $this->user, 'Converting page titles to lowercase', true );
- $ok = $status->isOK() ? 'OK' : $status->getWikiText();
+ $ok = $status->isOK() ? 'OK' : $status->getWikiText( false, false, 'en' );
$this->output( "\"$display\" -> \"$targetDisplay\": $ok\n" );
}
if ( $ok === true ) {
$exit = 1;
}
if ( !$status->isGood() ) {
- $this->output( $status->getWikiText() . "\n" );
+ $this->output( $status->getWikiText( false, false, 'en' ) . "\n" );
}
exit( $exit );
}
$archive = $image->publish( $file, $flags, $publishOptions );
if ( !$archive->isGood() ) {
echo "failed. (" .
- $archive->getWikiText() .
+ $archive->getWikiText( false, false, 'en' ) .
")\n";
$failed++;
continue;
$mp = new MovePage( $source, $dest );
$status = $mp->move( $wgUser, $reason, !$noredirects );
if ( !$status->isOK() ) {
- $this->output( "\nFAILED: " . $status->getWikiText() );
+ $this->output( "\nFAILED: " . $status->getWikiText( false, false, 'en' ) );
}
$this->commitTransaction( $dbw, __METHOD__ );
$this->output( "\n" );
}
}
- throw new MWException( "Could not determine revision id (" . $status->getWikiText() . ")" );
+ throw new MWException( "Could not determine revision id ("
+ . $status->getWikiText( false, false, 'en' ) . ")" );
}
/**
RequestContext::getMain()->getStats()->timing( 'media.thumbnail.stream', $streamtime );
} else {
wfThumbError( 500, 'Could not stream the file', null, [ 'file' => $thumbName,
- 'path' => $thumbPath, 'error' => $status->getWikiText() ] );
+ 'path' => $thumbPath, 'error' => $status->getWikiText( false, false, 'en' ) ] );
}
return;
}
$status = $thumb->streamFileWithStatus( $headers );
if ( !$status->isOK() ) {
wfThumbError( 500, 'Could not stream the file', null, [
- 'file' => $thumbName, 'path' => $thumbPath, 'error' => $status->getWikiText() ] );
+ 'file' => $thumbName, 'path' => $thumbPath,
+ 'error' => $status->getWikiText( false, false, 'en' ) ] );
}
}
}